<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Cmstenet extends CI_Controller {

	function __construct() {
        parent::__construct();	
		$this->isLogin();	
		
		
	}
	
	function isLogin(){
		$login=$this->session->userdata('isLogin');
		if(! isset($login)||$login != true){
			$this->session->set_flashdata('error_login', 'Untuk Mengakses Admin Anda Harus Login!');
			redirect('login');	
		}
	}
	public function index()
	{
		$data['main_view']='admin/main';
		//echo 'nama user '.$this->session->userdata('user_id');
		//exit;
		$this->load->view('admin_template',$data);
	}
}